﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace VirtualOperator
{
    public partial class LinkDetails : Form
    {
        private VirtualNetwork.Link link;
        public LinkDetails(string overview, string routing)
        {
            InitializeComponent();
            overviewTextBox.Text = overview;
            textBoxRouting.Text = routing;
        }

        public LinkDetails(VirtualNetwork.Link link)
        {
            InitializeComponent();
            this.link = link;
            overviewTextBox.Text = "Basic information: " + Environment.NewLine;
            overviewTextBox.Text += "Source->Target: " + link.ToString() + Environment.NewLine;
            overviewTextBox.Text += "Capacity: " + link.MaxCapacity + Environment.NewLine;
            overviewTextBox.Text += "Link coefficient: " + Environment.NewLine;
            overviewTextBox.Text += "Delay: " + link.Delay + Environment.NewLine;
            overviewTextBox.Text += "Errorrate: " + link.ErrorRate + Environment.NewLine;
          
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
